#import <Foundation/Foundation.h>
#import "Building.h"
#import "SFUEventSearchResponseDelegate.h"
#import "SFUEventSearchEngineDelegate.h"
#import "ParsingUtilities.h"
#import "EventManager.h"
#import "PointOfInterestCollection.h"

/**
 * Provides an interface in between the Map subsystem and the event subsystem.
 * 
 * Allows for the interaction between responses and requests 
 *
 * @author      Justin Hollander
 * @version     0.5.0
 * @since       0.3.0
 * @see         SFUEventSearchEngineDelegate
 */
@interface MapSearchUtility : NSObject<SFUEventSearchEngineDelegate> {
	id<SFUEventSearchResponseDelegate> eventSearchDelegate; //used to update map when search completed
}

/**
 * Returns shared map search Utility object 
 *
 * @return  MapSearchUtility reference
 */
+(MapSearchUtility*) sharedMapSearchUtility;

/**
 * Sets the delegate for this class
 * 
 * @param  delegate for this class
 */
- (void) setDelegate:(id<SFUEventSearchResponseDelegate>)delegate;

/**
 * Attempts to match search parameters to a building. If a match is found the 
 * corresponding building is returned.
 *
 * @param searchText search parameter that contains building name keyword
 * @return matching buiding or null if no match
 */
- (Building*) searchByBuilding:(NSString*)searchText;

/**
 * Keyword event search.
 *
 * @param searchText
 */
- (void) searchByEvent:(NSString*)searchText;

/**
 * Sets the delegate for the event manager and calls the event managers
 * search events. This leads to the viewing of the EventSearchViewer
 * 
 * @param navController main application navigation controller 
 * @param delegate      delegate for for event manager
 */
- (void)searchEventsWithNavController:(UINavigationController*)navController 
					   searchDelegate:(id<SFUEventSearchResponseDelegate>)delegate;

@end
